package com.itheima.device.pojo;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "t_device_info", schema = "farm", catalog = "")
public class DeviceInfo {
    @Id
    private Integer id;
    private Integer did;
    private String info;
    private String param;
    private String install;
    private String dbtype;
    private String url;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "did")
    public Integer getDid() {
        return did;
    }

    public void setDid(Integer did) {
        this.did = did;
    }

    @Basic
    @Column(name = "info")
    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    @Basic
    @Column(name = "param")
    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    @Basic
    @Column(name = "install")
    public String getInstall() {
        return install;
    }

    public void setInstall(String install) {
        this.install = install;
    }

    @Basic
    @Column(name = "dbtype")
    public String getDbtype() {
        return dbtype;
    }

    public void setDbtype(String dbtype) {
        this.dbtype = dbtype;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeviceInfo that = (DeviceInfo) o;
        return id == that.id &&
                did == that.did &&
                Objects.equals(info, that.info) &&
                Objects.equals(param, that.param) &&
                Objects.equals(install, that.install) &&
                Objects.equals(dbtype, that.dbtype) &&
                Objects.equals(url, that.url);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, did, info, param, install, dbtype, url);
    }
}
